<!--

  父 向 子 传值

    component <Anonymous>, 
    but the declared prop name is "cInfo". 
    Note that HTML attributes are case-insensitive 
    and camelCased props need to 
    use their kebab-case equivalents 
    when using in-DOM templates. 
    You should probably 
    use "c-info" instead of "cInfo".

    组件<Anonymous>，
    但声明的属性名为“cInfo”。
    注意，HTML属性不区分大小写，
    camelCased props在DOM模板中使用时需要使用它们的kebab大小写等价物。
    你应该用“c-info”而不是“cInfo”。
-->

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <cpn
      :cinfo='info'
    ></cpn>
  </div>

  <template id='aaa'>
    <div v-if='cinfo'>
      <h2>name={{cinfo.name}}</h2>
      <h2>age={{cinfo.age}}</h2>
      <h2>height={{cinfo.height}}</h2>
    </div>
    <div v-else></div>
  </template>

  <script src='../../js/vue.js'></script>
  <script>
    const cpn = {
      template: '#aaa',
      props: {
        cinfo: Object,
      }
    }

    const app = new Vue({
      el: '#app',
      data: {
        info: {
          name: 'srx',
          age: 18,
          height: 1.11
        }
      },
      components: {
        cpn
      }
    })
  </script>
</body>
</html>